"""
九九乘法口诀表
"""
i = 1
while i <= 9:
    j = 1
    while j <= i:
        print(j,'X',i,'=',j*i,end=' ')
        j = j + 1
    print()
    i += 1

print('-'*30)

i = 9
while i >= 1:
    j = i
    while j >= 1:
        print(j,'X',i,'=',j*i,end=' ')
        j -= 1
    print()
    i -= 1